
<%@ page language="java" contentType="text/html;charset=utf-8" pageEncoding="utf-8"%>
<!DOCTYPE HTML>
<html>

<head>

</head>
<body>
<style>
    form div{
        white-space:nowrap;
    }
</style>
<div class="pd-10">
    <div >
        <form id='registerform'action="<%=request.getContextPath()%>/back/role/doadd.do" method="post" class="form form-horizontal">
            <input type="hidden" id="unid"name="unid" />

            <div class="row cl">
                <label class="form-label col-3"><span class="c-red">*</span>角色名称：</label>
                <div class="formControls col-5">
                    <input type="text" class="input-text"  id="rolename" name="rolename" datatype="*1-12">
                </div>
                <div class="col-4"> </div>
            </div>
            <div class="row cl">
                <label class="form-label col-3">创建时间：</label>
                <div class="formControls col-5">
                    <input  ignore="ignore" id="createdate" name='createdate'class="Wdate input-text" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd',maxDate:'%y-%M-%d'})" />
                </div>
                <div class="col-3"> </div>
            </div>
            <div class="row cl" style="margin-top:25px">
                <div class="col-9 col-offset-3">

                    <button class="btn btn-primary radius" id="submitBtn"> 确定</button>&nbsp;&nbsp;&nbsp;
                    <button class="btn  radius" type='reset'> 重置</button>&nbsp;&nbsp;&nbsp;
                </div>
            </div>
        </form>
    </div>
</div>
</body>
</html>
<%@include file="../../head-ui.jsp"%>

<script type="text/javascript">
    $(function(){



        $('.skin-minimal input').iCheck({
            checkboxClass: 'icheckbox-blue',
            radioClass: 'iradio-blue',
            increaseArea: '20%'
        });

        var form=$("#registerform").Validform({
            tiptype:3,
            callback:function(data){

                if(data.message=="false"){
                    layer.msg('保存失败!',{icon: 1,time:1000});

                }else{
                    layer.alert('保存成功!', {
                        icon: 1,//2表示保存失败图标，1表示保存成功
                        closeBtn:false,
                        shadeClose: true,
                        title: "提示"
                    }, function(){

                        layer_close();
                    });
                    //layer.msg('保存成功!',{icon: 1,time:1000});
                    $("#uuid").val(data.uuid);
                }
            },
            ajaxPost:true,
            showAllError:true

        });

        $("#submitBtn").click(function(){
            form.submitForm(false);
        })
    })
</script>

